package com.example.librarysystem.Service;

import com.example.librarysystem.entity.Books;
import com.example.librarysystem.entity.Times;

import java.util.List;

public interface BooksService {
    Integer selectCount();
    List<Books> selectAll(int currentPage, int pageSize);
    Integer selectScoreByName(String name);
    List<Books> selectAllByLimit(int currentPage, int pageSize);
    List<Books> selectAllByClassification(String c, int currentPage, int pageSize);
    Books selectById(int id);
    Books selectByNameOnly(String name);
    List<Books> selectByISBN1(String ISBN);
    List<Books> selectByISBN(String ISBN, int currentPage, int pageSize);
    List<Books> selectBySameBorrower(String bookName);
    List<Books> selectBySameStar(String bookName);
    List<Books> selectByName(String name, int currentPage, int pageSize);
    List<Books> selectByPublishingHouse(String publishingHouse, int currentPage, int pageSize);
    List<Books> selectByPublishDate(String publishDate, int currentPage, int pageSize);
    List<Books> selectByAuthor(String author, int currentPage, int pageSize);
    List<Books> selectByScoreDesc(int currentPage, int pageSize);
    List<Books> selectBookByClickDesc(int currentPage, int pageSize);
    List<Books> selectBookBySearchDesc(int currentPage, int pageSize);
    List<Books> selectBookByBorrowDesc(int currentPage, int pageSize);
    List<Books> selectBookByStarDesc(int currentPage, int pageSize);
    int updateScoreByName(int score, String name);
    int updateBookBorrow(int id, boolean borrown);
    int insertBook(Books books, Times times);
    int updateById(Books books);
    int deleteById(int id);
}
